package com.cai.servlet.item;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.*;
import java.io.IOException;

/**
 * @author RuoLi
 */
@WebServlet(name = "ServletItemUpdate", value = "/itemUpdate")
public class ServletItemUpdate extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    }

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String id = request.getParameter("item_id");
        String name = request.getParameter("item_name");
        HttpSession session = request.getSession();
        session.setAttribute("item_id_update",id);
        session.setAttribute("item_name_update",name);
    }
}
